package com.spsoft.vatoutinv.enums;

/**
 * @author wangy
 */

public enum GeneralOrSpecialEnum {


    _01("01", "增值税专用发票"),
    _02("02", "普通发票"),
    _03("03", "机动车统一销售发票"),
    _04("04", "二手车统一销售发票"),
    _05("05", "铁路电子客票"),
    _06("06", "航空运输客票电子行程单");


    public final String key;
    public final String value;

    GeneralOrSpecialEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static boolean isInclude(String key) {
        boolean include = false;
        for (LzfpbzEnum e : LzfpbzEnum.values()) {
            if (e.getKey().equals(key)) {
                include = true;
                break;
            }
        }
        return include;
    }

    public static String getValueByKey(String key) {
        String value = "";
        for (LzfpbzEnum e : LzfpbzEnum.values()) {
            if (e.getKey().equals(key)) {
                value = e.value;
            }
        }
        return value;
    }


}
